package com.study.refor2020;

/**
 * @version V1.0
 * @title: CoverCodeUtil
 * @description: ${DESCRIPTION}
 * @author: wanghuilong
 * @date: 2020-09-01 10:59
 * @copyright: http://fingo.com.my/
 */
public class CoverCodeUtil {


    private static String errorCode =
            "SUCCESS = 1;//请求成功\n" +
                    "APP_LOGIN_EXPIRED = 901; //app登录过期\n" +
                    "    APP_PARAMS_ERROR = 902; //app传参错误，前端报：请求失败\n" +
                    "    APP_INVALID_MOBILE = 903; //app 手机号格式不正确\n" +
                    "    APP_REPEATED_SUBMIT = 904; //app 重复提交\n" +
                    "    APP_OPERATE_FAILED = 905; //app 操作失败，更新或插入请求\n" +
                    "    APP_VERSION_TOO_LOW = 906; //app 版本过低，请更新app\n" +
                    "    MEMBER_INVITE_CODE_INVALID = 1101; //用户会员邀请码无效#Invalid invitation code\n" +
                    "    MEMBER_MOBILE_HAS_BEEN_REGISTERED = 1102; //手机号已被注册\n" +
                    "    MEMBER_INCORRECT_MOBILE_OR_PASSWORD = 1103; //手机号或密码错误#Incorrect mobile or password\n" +
                    "    MEMBER_REGISTER_FAILURE = 1104; //目前注册人数过多，请稍后重试#Please try again later\n" +
                    "    MEMBER_INVALID_MOBILE = 1105; //手机号格式不正确#Please enter a valid mobile number\n" +
                    "    MEMBER_THREEKEY_BINDING_FAILURE = 1106; //第三方账号绑定失败\n" +
                    "    MEMBER_USER_EXISTED = 1108; //用户已存在，请用密码登录\n" +
                    "    MEMBER_VALIDATE_CODE_ERROR = 1109; //验证码错误\n" +
                    "    MEMBER_MOBILE_NOT_REGISTERED = 1110; //忘记密码时，输入的手机号未注册\n" +
                    "    MEMBER_MOBILE_NOT_SAME_AS_YOURSELF = 1111; //登录状态下重置密码，手机号输入的不是自己的\n" +
                    "    MEMBER_YOU_HAVE_NOT_SET_THE_PHONE_NUMBER = 1112; //您还未设置手机号，请先前去设置\n" +
                    "    MEMBER_ORIGINAL_PASSWORD_ERROR = 1113; //原密码错误\n" +
                    "    MEMBER_ALREADY_SET_MOBILE = 1114; //已经设置过手机号\n" +
                    "    MEMBER_YOU_HAVE_ALREADY_BOUND_OTHER_PEOPLE = 1115; //您已经绑定过邀请人#You have already bound a inviter\n" +
                    "    MEMBER_YOUR_LEVEL_IS_TOO_HIGH_TO_BOUND_OTHER_PEOPLE = 1116; //您的等级太高，无法绑定邀请人#Your level is too high to bind the inviter\n" +
                    "    MEMBER_LEVEL_IS_LOWER_THAN_YOURS = 1117; //该邀请码所属邀请者等级低于您的等级，无法完成绑定#The invitation codes' owner  level is lower than yours , the binding can't be set\n" +
                    "    MEMBER_CANNT_BIND_YOURSELF = 1118; //不能自我绑定#Cannt bind yourself\n" +
                    "    MEMBER_INVITER_IS_YOUR_FOLLOWER = 1119; //您不能绑定自己团队下的人哦#The invitation codes' owner is your follower, the binding can't be set\n" +
                    "    MEMBER_BINDING_FAILED = 1120; //绑定失败\n" +
                    "    MEMBER_SMS_FAILED_TO_SEND = 1121; //短信发送失败 message failed to send\n" +
                    "    MEMBER_SMS_IS_SENT_FREQUENTLY = 1122; //短信发送频繁，请一分钟后重试 SMS is sent frequently, please try again in one minute\n" +
                    "    MEMBER_EMAIL_BIND_FAILURE = 1123; //该邮箱已被其他账号绑定 The email has been bound by another account\n" +
                    "    MEMBER_LOGIN_PASSWORD_VERIFICATION_FAILED = 1124; //当前登录密码验证失败(用于修改手机号，验证当前登录密码) The current login password verification failed\n" +
                    "    MEMBER_QUESTION_TYPE_ERROR = 1125; // 反馈的类型没有或者不再规定的反馈类型里\n" +
                    "    MEMBER_QUESTION_DESC_ERROR = 1126; // 用户反馈的描述错误（空或者太长）\n" +
                    "    MEMBER_ADDRESS_ID_NULL = 1127; // 添加或者删除address是address_id为空\n" +
                    "    MEMBER_NO_DEFAULT_ADDRESS = 1128; // 用户没有默认地址\n" +
                    "    MEMBER_DETAIL_ADDRESS_WRONG_FORMAT = 1129; // 详细地址格式错误\n" +
                    "    MEMBER_CITY_CODE_NULL = 1130; // 市对应的code不能为空\n" +
                    "    MEMBER_CITY_NAME_NULL = 1131; // 市的名字不能为空\n" +
                    "    MEMBER_STATE_CODE_NULL = 1132; // 州对应的code不能为空\n" +
                    "    MEMBER_STATE_NAME_NULL = 1133; // 州名空\n" +
                    "    MEMBER_RECEIVER_NAME_WRONG_FORMAT = 1134; // 收货人姓名格式错误\n" +
                    "    MEMBER_COUNTRY_CODE_NULL = 1135; // 国家简码空\n" +
                    "    MEMBER_OPERATING_CONTENT_NULL = 1136;\n" +
                    "    MEMBER_CONTENT_BEYOND_MAX_LENGTH = 1137; // 字数超出上限\n" +
                    "    THIS_MOBILE_OWNER_IS_NOT_REGULAR_USER = 1138; // 该手机号用户不是老用户,请从客户端app进行请求验证码\n" +
                    "    MEMBER_COUNTRY_AREA_CODE_NULL = 1139; // 国家区号空\n" +
                    "    MEMBER_DEVICE_ID_NULL = 1140; // 设备ID空\n" +
                    "    MEMBER_THREE_KEY_NULL = 1141; // 三方key空\n" +
                    "    MEMBER_USER_NOT_EXISTS = 1142; //用户不存在\n" +
                    "    MEMBER_INVALID_EMAIL = 1143; //邮箱格式不正确\n" +
                    "    MEMBER_ADDRESS_NOT_EXIST = 1145; //地址不存在\n" +
                    "    DEVICE_INFO_IS_EMPTY = 1146; //设备信息为空\n" +
                    "    DEVICE_INFO_IS_INVALID = 1147; //设备信息无效\n" +
                    "    DEVICE_LID_IS_INVALID = 1148; //设备lid无效\n" +
                    "    DEVICE_TOKEN_IS_INVALID = 1149; //设备token无效";

    public static void main(String[] args) {
        String[] split = errorCode.split("\n");
        for (int i = 0; i < split.length; i++) {
            String str = split[i];
            String[] inSubs = str.split("//");
            if (inSubs.length == 1) {
                System.out.println(inSubs[0].trim().replaceAll("=", "(")
                        .replaceAll(";", ",\"\"),"));
            } else {
                System.out.println(inSubs[0].trim().replaceAll("=", "(")
                        .replaceAll(";", ",\"") + inSubs[1].trim() + "\"),");
            }
        }
    }

}
